//
//  YPConfigCore.swift
//
//  Created by jerry on 2020/5/23.
//  Copyright © 2020 ogawa. All rights reserved.
//

import Foundation
import UIKit

/// 本模块的名称， 本模块的storyboard 名称必须 与模块名称相同 ,已经用于静态资源的加载回用到
let YPConfig_modularName = "YPConfig"

public  class  YPConfigCore {
    
    public static var sharedInstance :  YPConfigCore {
        struct Static {
            static let instance :  YPConfigCore =  YPConfigCore()
        }
        return Static.instance
    }
    
    ///供其他模块使用
    public static var bundle:Bundle?{
        get{
            guard let bundleURL = Bundle(for: self).url(forResource: YPConfig_modularName, withExtension: "bundle") else {
                return nil
            }
            guard let bundle = Bundle(url: bundleURL) else {
                return nil
            }
            return bundle
        }
    }
    
}

